home *** CD-ROM | disk | FTP | other *** search
- Path: news.clark.net!usenet
- From: yom@clark.net (yom)
- Newsgroups: comp.lang.c
- Subject: Re: How do I use abs() on floats ?
- Date: 23 Feb 1996 03:04:44 GMT
- Organization: Your Organization
- Message-ID: <4gjasc$dgp@clarknet.clark.net>
- References: <4ghki0$b44@LNCSEX0003.eu.btco.com>
- NNTP-Posting-Host: yom.clark.net
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.7
-
- double fabs(double)
-
- Song (yom@clark.net)
-
- In article <4ghki0$b44@LNCSEX0003.eu.btco.com>, DaveMx says...
- >
- >What's the easiest way to get the absolute scalar value of a float.
- >I need to test to see of a variable is 'bigger' than a certain
- tolerance.
- >
- >e.g.
- >
- >if ( abs (error__float) > MAX_TOLERANCE ) printf ( "Tolerance level
- exceeded \n" );
- >
- >
- >BUT the abs() function says it only works on int 's . Any ideas how to
- do it for floats in the most elegant way ???
-
-